package com.njtoyo.taxi.admin.rest.wrapper.business.advertise;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.mapper.master.enums.AdvertiseApp;
import com.njtoyo.taxi.admin.mapper.master.enums.AdvertiseLocation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Objects;

@Data
@ApiModel("广告管理")
public class AdvertiseWrapper extends Page<AdvertiseWrapper> {
    public AdvertiseWrapper(Long current, Long size) {
        super(Objects.isNull(current) ? 1 : current, Objects.isNull(size) ? 15 : size);
    }

    @ApiModelProperty(value = "广告标题")
    private String title;

    @ApiModelProperty(value = "平台")
    @NotNull(message = "平台不能为空")
    private AdvertiseApp app;

    @ApiModelProperty(value = "运营区Id")
    private Long cantonId;

    @ApiModelProperty(value = "行政区IDs")
    private List<Long> cantonIds;

    @ApiModelProperty(value = "广告位")
    private AdvertiseLocation location;

    @ApiModelProperty(value = "是否启用")
    private Boolean isActive;

}
